package com.zhouyu.utils;

import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

/**
 * @author zhouyu
 * @date 2021/8/24 14:17
 * @Description:
 */
public class WechatX509TrustManager implements X509TrustManager {
    /*
     * Title: checkClientTrusted Author zhongjyuan Data 2020年7月14日上午10:36:35
     * Description: 检查客户端证书
     *
     * @param chain
     *
     * @param authType
     *
     * @throws CertificateException
     *
     * @see javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert.
     * X509Certificate[], java.lang.String)
     */
    @Override
    public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
    }

    /*
     * Title: checkServerTrusted Author zhongjyuan Data 2020年7月14日上午10:36:47
     * Description: 检查服务器端证书
     *
     * @param chain
     *
     * @param authType
     *
     * @throws CertificateException
     *
     * @see javax.net.ssl.X509TrustManager#checkServerTrusted(java.security.cert.
     * X509Certificate[], java.lang.String)
     */
    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
    }

    /*
     * Title: getAcceptedIssuers Author zhongjyuan Data 2020年7月14日上午10:36:57
     * Description: 返回受信任的X509证书数组
     *
     * @return
     *
     * @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
     */
    @Override
    public X509Certificate[] getAcceptedIssuers() {
        return null;
    }
}
